﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsClass.aspx.cs" Inherits="Manageweb_Manage_NewsClass" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    
<link href="../images/css.css" rel="stylesheet" type="text/css" />
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table border="1" cellpadding="0" cellspacing="0" width="750">
            <tr>
                <td style="font-weight: bold; color: white; background-color: #507cd1; text-align: left">
                    &nbsp;高级文章类别管理</td>
            </tr>
        </table>
        <br />
        <asp:Label id="LB_AdvancedNewsClass" runat="server" ForeColor="Red" Font-Size="Small" Font-Bold="True"></asp:Label>
        <table border="1" cellpadding="0" cellspacing="0" width="750">
            <tr>
                <td>
                    <asp:GridView ID="GV_NewsClass" runat="server" AutoGenerateColumns="False" CellPadding="4"
                        DataKeyNames="NC_ID" DataSourceID="ODS_NewsClass" ForeColor="#333333" Width="100%">
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <Columns>
                            <asp:BoundField DataField="NC_ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                                SortExpression="NC_ID" />
                            <asp:TemplateField HeaderText="标题" SortExpression="NC_Title">
                                <ItemStyle HorizontalAlign="Left" />
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# FormatClassTitle(Eval("NC_Title"), Eval("NC_Level")) %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="NC_Level" HeaderText="级别" SortExpression="NC_Level" />
                            <asp:TemplateField HeaderText="是否锁定" SortExpression="NC_IsLock">
                                <EditItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("NC_IsLock") %>' />
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:Button ID="Btn_IsLock" runat="server" OnClientClick="return confirm('此操作将锁定此类别下所有子类别及文章，确认继续？')"
                                        Width="55px" CommandArgument='<%# Eval("NC_ID") %>' OnCommand="Btn_IsLock_Command" Text='<%# FormatIsLock(Eval("NC_IsLock")) %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <RowStyle BackColor="#EFF3FB" />
                        <EditRowStyle BackColor="#2461BF" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                    </asp:GridView>
                    <asp:ObjectDataSource ID="ODS_NewsClass" runat="server" OldValuesParameterFormatString="original_{0}"
                        SelectMethod="GetAllDataOrderByClassCode" TypeName="AccessDAL.NewsClassTableAdapters.NewsClassTableAdapter">
                    </asp:ObjectDataSource>
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
